/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.bayu.services.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author joep
 */
@Entity
@Table(name = "avg_stop_time")
@NamedQueries({@NamedQuery(name = "AvgStopTime.findAll", query = "SELECT a FROM AvgStopTime a"), @NamedQuery(name = "AvgStopTime.findById", query = "SELECT a FROM AvgStopTime a WHERE a.id = :id"), @NamedQuery(name = "AvgStopTime.findByTahun", query = "SELECT a FROM AvgStopTime a WHERE a.tahun = :tahun"), @NamedQuery(name = "AvgStopTime.findByAverage", query = "SELECT a FROM AvgStopTime a WHERE a.average = :average"), @NamedQuery(name = "AvgStopTime.findByJenis", query = "SELECT a FROM AvgStopTime a WHERE a.jenis = :jenis")})
public class AvgStopTime implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Basic(optional = false)
    @Column(name = "tahun")
    private int tahun;
    @Basic(optional = false)
    @Column(name = "average")
    private double average;
    @Basic()
    @Column(name = "jenis")
    private String jenis;

    public AvgStopTime() {
    }

    public AvgStopTime(Long id) {
        this.id = id;
    }

    public AvgStopTime(Long id, int tahun, double average, String jenis) {
        this.id = id;
        this.tahun = tahun;
        this.average = average;
        this.jenis = jenis;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getTahun() {
        return tahun;
    }

    public void setTahun(int tahun) {
        this.tahun = tahun;
    }

    public double getAverage() {
        return average;
    }

    public void setAverage(double average) {
        this.average = average;
    }

    public String getJenis() {
        return jenis;
    }

    public void setJenis(String jenis) {
        this.jenis = jenis;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AvgStopTime)) {
            return false;
        }
        AvgStopTime other = (AvgStopTime) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bayu.services.entity.AvgStopTime[id=" + id + "]";
    }

}
